package com.cloud.flowable.entity.vo;

import cn.hutool.core.util.ObjectUtil;
import com.cloud.flowable.entity.WfDeployForm;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(name = "流程详情视图VO", description = "流程管理")
public class WfDetailVo {

    @Schema(description = "任务表单信息")
    private WfDeployForm taskFormData;

    @Schema(description = "历史流程节点信息")
    private List<WfProcNodeVo> historyProcNodeList;

    @Schema(description = "流程表单列表")
    private List<WfDeployForm> processFormList;

    @Schema(description = "流程XML")
    private String bpmnXml;

    @Schema(description = "任务追踪视图对象")
    private WfViewVo flowViewer;

    /**
     * 是否存在任务表单信息
     *
     * @return true:存在；false:不存在
     */
    public Boolean isExistTaskForm() {
        return ObjectUtil.isNotEmpty(this.taskFormData);
    }

}
